﻿
#region Namespace

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.OleDb;
using System.Configuration;

#endregion

namespace eSilky.DAL
{
    public class dBConnection
    {
        #region Methods
        #region Database Connection
        /// <summary>
        /// Database Connection
        /// </summary>
        /// <returns>SqlConnection</returns>
        public static OleDbConnection GetConnection()
        {
            OleDbConnection dbCon = null;
            try
            {
                string connStr = ConfigurationManager.ConnectionStrings["eSilkyConn"].ConnectionString;
                dbCon = new OleDbConnection(connStr);
            }
            catch (Exception)
            {
                throw;
            }

            return dbCon;
        }

        #endregion
        #endregion
    }
}